package svc

import (
	"cp/api/internal/config"
	"cp/cprpc/cprpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config config.Config
	CpRpc  cprpcclient.Cprpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		CpRpc:  cprpcclient.NewCprpc(zrpc.MustNewClient(c.CpRpc)),
	}
}
